<?xml version="1.0"?>
<jsp:root 	xmlns:jsp="http://java.sun.com/JSP/Page"
 			xmlns:c="http://java.sun.com/jsp/jstl/core"
 			xmlns="http://www.w3.org/1999/xhtml"
 			version="2.1">
 
 <jsp:directive.page contentType="text/html" pageEncoding="UTF-8" />
 <jsp:directive.page isELIgnored="false" />
 <jsp:output 	omit-xml-declaration="false" 
 			 	doctype-root-element="HTML" 
 				doctype-system="about:legacy-compat" />
 
 <jsp:useBean id="datosLogin" class="es.javamyadmin.beans.LoginBean" scope="session" />
 
 <jsp:useBean id="listaTablesBean" class="es.javamyadmin.beans.ListaTablesBean" scope="session" />
 
 <jsp:setProperty property="user" name="listaTablesBean" value="${datosLogin.usuario}" />
 <jsp:setProperty property="pass" name="listaTablesBean" value="${datosLogin.password}" />
 <jsp:setProperty property="host" name="listaTablesBean" value="${datosLogin.servidor}" />
 <jsp:setProperty property="port" name="listaTablesBean" value="${datosLogin.puerto}" />
 
 <c:if test="${(param.bd != null) and (param.bd != '')}">
 	<jsp:setProperty property="database" name="listaTablesBean" value="${param.bd}" />
 </c:if>
 <c:if test="${param.tabla != null }">
 	<jsp:setProperty property="table" name="listaTablesBean" value="${param.tabla}" />
 </c:if>

<html>
<head>

<link rel="icon" href="${pageContext.request.contextPath}/images/icons/favicon.png" type="image/x-icon"/>
<link rel="shortcut icon" href="${pageContext.request.contextPath}/images/icons/favicon.png" type="image/x-icon" />

<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/reset.css" media="screen" />
<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/css/java-admin.css" media="screen" />

<title>JavaMyAdmin</title>

</head>

<script id="respuesta">
	var dgrsd;
</script>

<body onload="init('${listaTablesBean.user}','${listaTablesBean.pass}','${listaTablesBean.host}','${listaTablesBean.port}','${listaTablesBean.database}','${listaTablesBean.table}');">
<div id="wrapper">
<div id="todo">

<div id="contenedor">
	
	<jsp:include page="../includes/sidebar-left.jsp" />
	
	<div id="contenido">
	
		<jsp:include page="../includes/cabecera.jsp" />
		
		<h2>Base de Datos: <c:out value="${listaTablesBean.database}"></c:out></h2>
		
		<!-- <jsp:include page="../includes/menu-tabla-superior.jsp" /> -->
		
		<!-- Errores -->
		<div id="error"><!-- A --></div>
		<c:if test="${error!=null}"><div id="ko"  class="aviso"><div class="pro_aviso ko"><p>${error }<c:if test="${descripcion != null}"><a id="especial" data-toggle="modal" href="#windowTitleDialog" onclick="cargarDatosMsj('6', '${descripcion}', '');" style="font-size:'10px'; "> (más)</a></c:if></p></div></div></c:if>		
		<c:if test="${ok!=null}"><div id="ok" class="aviso"><div class="pro_aviso ok"><p><c:out value="${ok}"></c:out></p></div></div></c:if>
		
		<div style="width:400px; margin: 50px auto; text-align: center;">		
			<p style="margin-bottom: 30px;">Por favor, seleccione el archivo .sql que desea importar</p>
		
			<form action="${pageContext.request.contextPath}/importarBD" method="post" enctype="multipart/form-data">
			
		 		<input style="width: 350px;" class="campo" type="file" name="importBD" id="importBD"/>
		 		
				<input type="hidden" name="user" value="${listaTablesBean.user }"/>
				<input type="hidden" name="database" value="${listaTablesBean.database }"/>
				<input type="hidden" name="pass" value="${listaTablesBean.pass }"/>
				<input type="hidden" name="port" value="${listaTablesBean.port }"/>
				<input type="hidden" name="host" value="${listaTablesBean.host }"/>
				<br/>
				<input class="boton" type="submit" value="Importar" />
			</form>			
		</div>
		
		
	</div>

</div>

</div>
</div>
</body>
</html>
</jsp:root>